From: Gabriel Wicke Date: Mon, 25 Apr 2005 11:09:21 +0000 (+0000) Subject: CategoryPageView hook as in 1.4 X-Git-Tag: 1.5.0alpha1~139 X-Git-Url: http://git.cyclocoop.org/%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%5B%27/%29%20AND%20%24p1%3C%24p%29%20%24p%20=%20%24p1;%20%24flux%20=%20substr_replace%28%24flux%2Cpipeline%28?a=commitdiff_plain;h=f3810a3c70c7cbe38ce1558c84b533f0083c9634;p=lhc%2Fweb%2Fwiklou.git CategoryPageView hook as in 1.4 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 78b66ba31d..c64425b378 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -336,3 +336,6 @@ $article: article object to be watched $user: user that watched $article: article object watched +'CategoryPageView': before viewing a categorypage in CategoryPage::view +$catpage: CategoryPage instance + diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 2922b7159a..b90cb3361e 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -19,6 +19,8 @@ if( $wgCategoryMagicGallery ) class CategoryPage extends Article { function view() { + if(!wfRunHooks('CategoryPageView', array(&$this))) return; + if ( NS_CATEGORY == $this->mTitle->getNamespace() ) { $this->openShowCategory(); }